/*  1:   */ package com.atomikos.icatch.imp;
/*  2:   */ 
/*  3:   */ import com.atomikos.icatch.HeurHazardException;
/*  4:   */ import com.atomikos.icatch.HeurMixedException;
/*  5:   */ import com.atomikos.icatch.HeurRollbackException;
/*  6:   */ import com.atomikos.icatch.HeuristicMessage;
/*  7:   */ import com.atomikos.icatch.Participant;
/*  8:   */ import com.atomikos.icatch.RollbackException;
/*  9:   */ import com.atomikos.icatch.system.Configuration;
/* 10:   */ 
/* 11:   */ class CommitMessage
/* 12:   */   extends PropagationMessage
/* 13:   */ {
/* 14:44 */   protected boolean onephase_ = false;
/* 15:46 */   protected int retrycount_ = 0;
/* 16:   */   
/* 17:   */   public CommitMessage(Participant participant, Result result, boolean onephase)
/* 18:   */   {
/* 19:53 */     super(participant, result);
/* 20:54 */     this.onephase_ = onephase;
/* 21:   */   }
/* 22:   */   
/* 23:   */   protected Object send()
/* 24:   */     throws PropagationException
/* 25:   */   {
/* 26:70 */     Participant part = getParticipant();
/* 27:71 */     HeuristicMessage[] msgs = null;
/* 28:   */     try
/* 29:   */     {
/* 30:73 */       return part.commit(this.onephase_);
/* 31:   */     }
/* 32:   */     catch (RollbackException rb)
/* 33:   */     {
/* 34:76 */       throw new PropagationException(rb, false);
/* 35:   */     }
/* 36:   */     catch (HeurMixedException heurm)
/* 37:   */     {
/* 38:78 */       throw new PropagationException(heurm, false);
/* 39:   */     }
/* 40:   */     catch (HeurRollbackException heurr)
/* 41:   */     {
/* 42:80 */       throw new PropagationException(heurr, false);
/* 43:   */     }
/* 44:   */     catch (Exception e)
/* 45:   */     {
/* 46:85 */       String msg = "Unexpected error in commit";
/* 47:86 */       Configuration.logWarning(msg, e);
/* 48:87 */       HeurHazardException heurh = new HeurHazardException(part.getHeuristicMessages());
/* 49:   */       
/* 50:89 */       throw new PropagationException(heurh, true);
/* 51:   */     }
/* 52:   */   }
/* 53:   */   
/* 54:   */   public String toString()
/* 55:   */   {
/* 56:95 */     return "CommitMessage to " + getParticipant();
/* 57:   */   }
/* 58:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.CommitMessage
 * JD-Core Version:    0.7.0.1
 */